package com.yz.lzq.liwushuo.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by AdminJia on 2016/11/24.
 */

public class GiftAdapter extends FragmentPagerAdapter {
    private List<Fragment> mList_fragment;
    private String[] arrTitles;

    public GiftAdapter(FragmentManager fm, List<Fragment> mList_fragment, String[]
            arrTitles) {
        super(fm);
        this.mList_fragment = mList_fragment;
        this.arrTitles = arrTitles;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return arrTitles[position];
    }

    public GiftAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return mList_fragment.get(position);
    }

    @Override
    public int getCount() {
        return arrTitles.length;
    }
}
